package team.yidong.fenda.wx.controller;

import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import team.yidong.fenda.entity.User;
import team.yidong.fenda.utils.QiNiuYunUtil;

import java.util.Arrays;

/**
 * Created by xuanlong on 2017/10/17.
 */
@Controller
public class QiniuUpTokenController {
    @Autowired
    QiNiuYunUtil qiNiuYunUtil;

    @RequestMapping("/wx/upToken")
    @ResponseBody
    public JSONObject getUpToken() {

        JSONObject jsonObject = new JSONObject();
        jsonObject.put("uptoken", qiNiuYunUtil.getUpToken());
        return jsonObject;
    }

}
